import 'dart:async';

import 'package:easy_refresh/easy_refresh.dart';
import 'package:flutter/material.dart';

import 'refresh_stlye.dart';

class MyRefresh extends StatelessWidget {

  final Widget child;
  final FutureOr Function()? onRefresh;
  final FutureOr Function()? onLoad;

  const MyRefresh({super.key, this.onRefresh, this.onLoad, required this.child});


  @override
  Widget build(BuildContext context) {
  return  EasyRefresh(
      header:  RefreshStyle.header,
      footer: RefreshStyle.footer,
      onRefresh: onRefresh,
      onLoad:onLoad,
      child:child,
    );
  }


}